package org.btallarm.model;
import org.btallarm.json.ArrayField;
import org.btallarm.json.JSONMappingInfo;
import org.btallarm.json.JSONMappingType;


public class State {
	

	@JSONMappingInfo(objectType=JSONMappingType.JSON_ARRAY, isRequired = true)
	@ArrayField(defaultCapacity = 16, enclosingType = JSONMappingType.JSON_OBJECT)
	private Angle []angles;
	@JSONMappingInfo(objectType=JSONMappingType.JSON_INTEGER, isRequired = true)
	private Integer angles_count=0;
	@JSONMappingInfo(objectType=JSONMappingType.JSON_ARRAY, isRequired = true)
	@ArrayField(defaultCapacity = 16, enclosingType = JSONMappingType.JSON_OBJECT)
	private Shake []shakes;
	@JSONMappingInfo(objectType=JSONMappingType.JSON_INTEGER, isRequired = true)
	private Integer shakes_count=0;
	

	public Angle [] getAngles() {
		return angles;
	}

	public void setAngles(Angle [] angles) {
		this.angles = angles;
	}
	
	public void add(Angle angle) {
		if (this.angles_count>=this.angles.length) return;
		this.angles[this.angles_count]= angle;
		this.angles_count++;
	}
	

	public Shake [] getShakes() {
		return shakes;
	}

	public void setShakes(Shake [] shakes) {
		this.shakes = shakes;
	}
	
	public void add(Shake shake) {
		if (this.shakes_count>=this.shakes.length) return;
		this.shakes[this.shakes_count]= shake;
		this.shakes_count++;
	}
	
}
